<template>
    <div class="header">
        <div class="header-left">
            <div class="iconfont back">&#xe624;</div>
        </div>
        <div class="header-input">
            <span class="iconfont">&#xe632;</span>
            输入景点游玩主题</div>
        <router-link to='/city'>
            <div class="header-right">{{this.city}}
                <span class="iconfont down">&#xe65c;</span>
             </div>
        </router-link> 
    </div>
</template>
<script>
import { mapState } from 'vuex'
export default {
    name:'homeHeader',
    computed: mapState([
        // 映射 this.count 为 store.state.count
        'city'
    ])
}
</script>

<style lang="stylus" scoped  rel="stylesheet/stylus">
    @import '~styles/varibles.styl'

    .header
        height:.86rem
        background-color:$bgColor
        color:#fff
        line-height: $headerHight
        display: flex
        .header-left
            width: .64rem
            float left
            .back
                font-size : .4rem
                text-align :center
        .header-right
            text-align :center
            min-width: 1.04rem
            padding :0 .1rem
            float:right
            color:white
            .down
                margin-left:-.1rem
        .header-input
            flex:1
            padding-left:0.2rem
            background:#fff
            border-radius:.1rem
            margin-top:.12rem
            height: 0.64rem
            margin-left: .2rem
            color:#ccc
            line-height : .64rem

</style>